from AIAssistant import AIAssistant

class TextGenerationAssistant(AIAssistant):
    """子类：文本生成助手"""

    def __init__(self, aid: str, name: str, version: str, is_online: bool, ability_score: int,
                 supported_language_pairs: str):
        super().__init__(aid, name, "文本生成", version, is_online, ability_score)
        self.supported_language_pairs = supported_language_pairs

    def execute_task(self, task_content: str) -> str:
        return f"[{self.get_name()}] 执行文本生成任务：\n任务内容：{task_content}\n生成结果：已完成文本创作（支持类型：{self.supported_language_pairs}）"

    def get_supported_language_pairs(self) -> str:
        return self.supported_language_pairs

    def set_supported_language_pairs(self, supported_language_pairs: str) -> None:
        self.supported_language_pairs = supported_language_pairs

    def __str__(self) -> str:
        return super().__str__() + f", 支持文本类型: {self.supported_language_pairs}"  # 修复5: 修正描述文本